﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RearLivestock.Common.Dtos
{
    /// <summary>
    /// 统一返回值类
    /// </summary>
    public class Result
    {
        /// <summary>
        /// 响应码
        /// </summary>
        public int Code { get; set; }
        /// <summary>
        /// 返回值
        /// </summary>
        public object Data { get; set; }
        /// <summary>
        /// 消息
        /// </summary>
        public string Msg { get; set; }
    }
    public class Result<T>
    {
        /// <summary>
        /// 响应码
        /// </summary>
        public int Code { get; set; }
        /// <summary>
        /// 返回值
        /// </summary>
        public T Data { get; set; }
        /// <summary>
        /// 消息
        /// </summary>
        public string Msg { get; set; }
    }

    /// <summary>
    /// 导出文件
    /// </summary>
    public class FileExportResult
    {
        /// <summary>
        /// 文件字节内容
        /// </summary>
        public byte[] FileBytes { get; set; }

        /// <summary>
        /// MIME类型
        /// </summary>
        public string MimeType { get; set; }

        /// <summary>
        /// 导出文件名称 .xlsx必须加
        /// </summary>
        public string FileName { get; set; }
    }

}
